package com.coolgor.axnut.dto.auth;

import java.util.List;

import com.coolgor.airvow.Util.DataTree;
import com.coolgor.axnut.entity.auth.Role;
import com.coolgor.axnut.enums.auth.RoleStateEnum;

public class RoleExecution {
	// 结果状态
	private int state;

	// 状态标识
	private String stateInfo;

	// 执行结果的数量
	private int count;

	// 操作的对象(增删改的时候用到)
	private Role role;

	// 获取的结果列表(查询列表的时候使用)
	private List<Role> roleList;	
	
	// 获取的树形结果(查询列表的时候使用)
	private DataTree roleTree;

	public RoleExecution() {	}

	// 操作失败的时候使用的构造器
	public RoleExecution(RoleStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 增删改 操作成功的时候使用的构造器
	public RoleExecution(RoleStateEnum stateEnum, Role role) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.role = role;
	}

	// 查询 操作成功的时候使用的构造器
	public RoleExecution(RoleStateEnum stateEnum, List<Role> roleList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.roleList = roleList;
	}
	
	// 查询 操作成功的时候使用的构造器
	public RoleExecution(RoleStateEnum stateEnum, DataTree roleTree) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.roleTree = roleTree;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public List<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<Role> roleList) {
		this.roleList = roleList;
	}

	public DataTree getRoleTree() {
		return roleTree;
	}

	public void setRoleTree(DataTree roleTree) {
		this.roleTree = roleTree;
	}
	
	

}
